//
//  DKImagePickerUtil.swift
//  maopu
//
//  Created by 黄海波 on 2017/4/27.
//  Copyright © 2017年 maopu. All rights reserved.
//

import UIKit

class DKImagePickerUtil: NSObject {
    
    class public func showDKImagePicker(vc:UIViewController , maxSelectableCount:Int = 9 , assetType:DKImagePickerControllerAssetType , defaultSelectedAssets:[DKAsset] , didSelectAssets: @escaping ((_ assets: [DKAsset]) -> Void)){
        
        let pickerController = DKImagePickerController()
        pickerController.maxSelectableCount = maxSelectableCount
        pickerController.assetType = assetType
        pickerController.defaultSelectedAssets = defaultSelectedAssets
        pickerController.UIDelegate = DKCustomUIDelegate()
        pickerController.didSelectAssets = {(assets:[DKAsset]) in
            didSelectAssets(assets)
        }
        vc.present(pickerController, animated: true, completion: nil)
    }
}
